package com.magold.game.factory;

import com.magold.io.XMLReader;
import com.magold.logic.Ejector;
import com.magold.logic.ISpriteLogic;

public class EjectorFactory extends BaseLogicFactory {

	public EjectorFactory() {
		super(Ejector.class.getSimpleName());
	}

	@Override
	protected ISpriteLogic createSafely(XMLReader pReader) {
		float rotateCycle = pReader.getFloat("rotate_cycle");
		float jetCycle = pReader.getFloat("jet_cycle");
		float velocity = pReader.getFloat("velocity");

		return new Ejector(rotateCycle, jetCycle, velocity);
	}

}
